package mail;


import api.AbstractMonintorService;
import dataobject.BaseMess;
import dataobject.MailMess;

import javax.annotation.Resource;

/**
 * @ Type : com.weiyi.ehr.monitor.mail
 * @ Author : TimLi
 * @ Desc :
 * @ Date : 2016-07-06 13:32
 */
public class MailMonintorSerivceImpl extends AbstractMonintorService {

    @Resource
    private MailFactory mailFactory;

    @Override
    public void send(BaseMess baseMess) {
        MailMess mailMess= (MailMess) baseMess;
        try {
        	mailFactory.sendMail(mailMess);
		} catch (Exception e) {
			e.printStackTrace();
		}
    }
}
